Skip to content

Guard against new and removed state change events#7687

Merged
balloob merged 1 commit into
devfrom
fix-state-automation
May 21, 2017
Merged

Guard against new and removed state change events#7687
balloob merged 1 commit into
devfrom
fix-state-automation

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented May 21, 2017

Description:

Guard for new events and for when we remove events (and thus to_s or from_s is None)

Related issue (if applicable): fixes #7691

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@balloob balloob merged commit 1710862 into dev May 21, 2017
@balloob balloob deleted the fix-state-automation branch May 21, 2017 14:41
@balloob balloob removed this from the 0.45.1 milestone May 22, 2017
@balloob balloob mentioned this pull request Jun 2, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Sep 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AttributeError: 'NoneType' object has no attribute 'last_changed'

5 participants